//bange_body.hpp
//Copyright (C) 2010-2011 Oscar (.teri) Triano

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.

//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.

//You should have received a copy of the GNU General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.

#ifndef _bange_body_
#define _bange_body_

#include <cstring>
#include <lua5.1/lua.hpp>
#include <chipmunk/chipmunk.h>

//!!-->Should be fine make a Move and Rotate method for a object with a body. The body rules.

namespace bange{
	
	class body{
		protected:
			bool isstatic;
			bool hasgravity;
			cpBody *thebody;
			cpSpace *space;
		public:
			body(cpSpace *);
			bool NewIndex(lua_State *);
			bool Index(lua_State *);
			void SetBodyX(cpFloat);
			void SetBodyY(cpFloat);
			cpFloat GetBodyX();
			cpFloat GetBodyY();
			~body();
	};
	
}

#endif
